package com.qf.service.impl;

import com.qf.dao.OrderDao;
import com.qf.pojo.Order;
import com.qf.pojo.resp.BaseResult;
import com.qf.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OrderServiceImpl implements OrderService {
    BaseResult baseResult = new BaseResult();
    @Resource
    OrderDao orderDao;
    @Override
    /**
     * 添加缴费订单
     */
    public BaseResult addOrder(Order order) {
        Integer integer = orderDao.addOrder(order);
        if (integer>0){
            baseResult.setCode(1);
            baseResult.setInfo("添加成功，请去支付！");
            return baseResult;
        }else {
            baseResult.setCode(0);
            baseResult.setInfo("添加失败！");
            return baseResult;
        }
    }
}
